package com.heima.day528_二维数组;

import java.util.Scanner;

public class Cskt524 {

    public static void main(String[] args) {
        //输入方法名查看题目输出结果

    }

    public static void bh304() {
        //编号304
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个整数：");
        int a = sc.nextInt();
        System.out.println("请输入第二个整数：");
        int b = sc.nextInt();
        System.out.println("请输入您要进行的运算（1：表示加法，2：表示减法，3：表示乘法，4表示除法）");
        int sf = sc.nextInt();
        int ok = 0;
        if (sf == 1) {
            ok = a + b;
            System.out.println(a + "+" + b + " = " + ok);
        } else if (sf == 2) {
            ok = a - b;
            System.out.println(a + "-" + b + " = " + ok);
        } else if (sf == 3) {
            ok = a * b;
            System.out.println(a + "×" + b + " = " + ok);
        } else if (sf == 4) {
            ok = a / b;
            System.out.println(a + "÷" + b + " = " + ok);
        } else {
            System.out.println("运算符输入错误，请按要求输入");
        }

    }

    public static void bh318() {
        //编号318
        System.out.println("该范围所有为猪年的年份是：");
        int pig = 2019, N = 12;
        for (int i = 1949; i <= 2019; i++) {
            if ((pig - i) % N == 0) {
                System.out.print(i + "  ");
            }
        }

    }

    public static void bh319() {
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
        System.out.println("@");
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
        System.out.println("@");
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
        System.out.println("@");
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
        System.out.print("@");
    }

    public static void bh313() {
        int max = 2019;
        int bai = 100;
        int run = 4;
        for (int i = 1988; i <= 2019; i++) {
            if ((max - i) % run == 0 & (max - i) % bai != 0) {
                System.out.print(i + "  ");
            }
        }
    }

    public static void bh601() {
        System.out.println("请输入星期数：（1-7）");
        Scanner sc = new Scanner(System.in);
        int week = sc.nextInt();
        //switch语句
         /*   switch (week){
                case 1:
                    System.out.println("周一：跑步");
                    break;
                case 2:
                    System.out.println("周二：游泳");
                    break;
                case 3:
                    System.out.println("周三：慢走");
                    break;
                case 4:
                    System.out.println("周四：动感单车");
                    break;
                case 5:
                    System.out.println("周五：拳击");
                    break;
                case 6:
                    System.out.println("周六：爬山");
                    break;
                case 7:
                    System.out.println("周日：好好吃一顿");
                    break;
            }*/
        //if语句
        if (week == 1) {
            System.out.println("周一：跑步");
        } else if (week == 2) {
            System.out.println("周二：游泳");
        } else if (week == 3) {
            System.out.println("周三：慢走");
        } else if (week == 4) {
            System.out.println("周四：动感单车");
        } else if (week == 5) {
            System.out.println("周五：拳击");
        } else if (week == 6) {
            System.out.println("周六：爬山");
        } else if (week == 7) {
            System.out.println("周日：好好吃一顿");
        } else {
            System.out.println("输入错误");
        }

    }

    public static void bh602() {
        for (int i = 1; i <= 100; i++) {
            if (i % 7 == 0 | i % 10 == 7) {
                System.out.print(i + " 过   ");
            }
        }
    }

    public static void plus() {
        System.out.println("it" + " + " + "heima");
        System.out.println("itheima" + " + " + 666);
        System.out.println(666 + " + " + "itheima");
        System.out.println("黑马" + " + " + 6 + " + " + 66);
        System.out.println(1 + " + " + 99 + " + " + "年黑马");
    }

    public static void bh202() {
        int ten = 10;
        System.out.println(ten);
        ten += 10;
        System.out.println(ten);
        short tenP = 10;
        tenP += 20;
        System.out.println(tenP);

    }

    public static void bh211() {
        double son = 0;
        son = (177 + 165) * 1.08 / 2;
        System.out.println("儿子身高为： " + (int) son);
        double daughter = 0;
        daughter = (177 * 0.923 + 165) / 2;
        System.out.println("女儿身高为： " + (int) daughter);
    }

    public static void bh212() {
        int redS = 21;
        int greenS = 24;
        if ((redS * 2 + 3) == (greenS * 2)) {
            System.out.println("红茶和绿茶现在的钱一样多");
        } else {
            System.out.println("不对");
        }
    }

    public static void bh214() {
        double m = 7988 - 1500; //6488
        double h = 7988 * 0.8;  //6390.4
        if (7988 - 1500 > 7988 * 0.8) {
            System.out.println("以旧换新打8折后只需花" + (float) h + "元，所以以旧换新更划算");
        } else {
            System.out.println("卖掉后只需花" + m + "元，卖掉更划算");
        }
    }


}



